package com.hb.trade.api.manager.controller;

/**
 * describe:
 *
 * @author zhongdl
 * @date 2022/03/23
 */


import com.hb.core.pojo.center.au.dto.AgencyUserBidDTO;
import com.hb.core.pojo.center.au.vo.AgencyBidUserVo;
import com.hb.core.pojo.parent.PageResult;
import com.hb.trade.client.center.UserClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.fzzn.core.model.msg.Message;
import org.fzzn.core.model.msg.ResponseDto;
import org.fzzn.core.util.ResultUtil;
import org.fzzn.core.web.anno.Version;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * describe:
 *
 * @author zhongdl
 * @date 2022/03/23
 */
@Slf4j
@Version(1.0)
@Api(tags = {"投标人审核相关接口"})
@RequestMapping("/{version}")
@RestController
public class ApiBidderUserController {

    protected final UserClient userClient;

    public ApiBidderUserController(UserClient userClient) {
        this.userClient = userClient;
    }


    @ApiOperation(value = "投标人审核列表", notes = "投标人审核列表", httpMethod = "POST")
    @PostMapping("/bidderUser/pageAgencyUser")
    public ResponseDto pageAgencyUser(@RequestBody AgencyUserBidDTO agencyUserDTO) {
        agencyUserDTO.setType(2);
        Message<PageResult<AgencyBidUserVo>> voPageResult = userClient.pageAuditUser(agencyUserDTO);
        return ResultUtil.msg(voPageResult);
    }
}
